<template>
	<view>
		<view class="address-window" :class="show == true ? 'on' : ''">
			<view class='title'>
				<view class="iconfont"><u-icon name="close" color="#888" size="20" @click='close'></u-icon></view>
			</view>
			<view class='list flex-all' @click="toJump('/pages/index/addImageTxt2', 1)">
				<image src="/static/imgs/fa1.png" mode="widthFix" />
				<view class="txt">发布图文</view><u-icon name="arrow-right" color="#888" size="20"></u-icon>
			</view>

			<view class='list flex-all' @click="toJump('/pages/index/addImageTxt2', 2)">
				<image src="/static/imgs/fa2.png" mode="widthFix" />
				<view class="txt">发布誓言</view><u-icon name="arrow-right" color="#888" size="20"></u-icon>
			</view>

			<view class='list flex-all' @click="toJump('/pages/index/addImageTxt2', 3)">
				<image src="/static/imgs/fa3.png" mode="widthFix" />
				<view class="txt">发布宣文</view><u-icon name="arrow-right" color="#888" size="20"></u-icon>
			</view>
		</view>
		<view class='mask' catchtouchmove="true" :hidden='show == false' @click='close'></view>
	</view>
</template>

<script>
export default {
	props: {
		show: {
			type: Boolean,
			default: false,
		}
	},
	data() {
		return {};
	},

	methods: {
		close() {
			this.$emit('changeClose',);
		},
		toJump(url, cid) {
			if (!url) return
			uni.navigateTo({
				url: url + '?cid=' + cid
			});
			this.$emit('changeClose',);
		},
	}
}
</script>

<style scoped lang="scss">
.address-window {
	background-color: #fff;
	box-shadow: 0px 0px 30rpx 0px rgba(202, 202, 202, 0.6);
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	z-index: 101;
	transform: translate3d(0, 100%, 0);
	transition: all .3s cubic-bezier(.25, .5, .5, .9);
	border-radius: 30rpx 30rpx 0 0;
	padding: 0 30rpx 100rpx;
}

.address-window.on {
	transform: translate3d(0, 0, 0);
}

.address-window .title {
	font-size: 28rpx;
	text-align: center;
	height: 123rpx;
	color: $uni-text-color-placeholder;
	line-height: 123rpx;
	position: relative;
}

.address-window .title .iconfont {
	position: absolute;
	right: 0rpx;
	top: 30rpx;
}

.address-window .list {
	padding: 30rpx 28rpx;
	background: #F6F6F6;
	border-radius: 30rpx;
	margin-bottom: 40rpx;
}


.address-window .list image {
	width: 50rpx;
}

.address-window .list .txt {
	font-size: 30rpx;
	color: $uni-text-color;
	flex: 1;
	padding-left: 26rpx;
}
</style>